]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
portalHelper: Address intermittent TLS failures
authorDebarshi Ray <debarshir@gnome.org>
Mon, 24 Oct 2016 13:20:26 +0000 (15:20 +0200)
committerDebarshi Ray <debarshir@gnome.org>
Wed, 23 Nov 2016 20:38:24 +0000 (21:38 +0100)
Users are currently experiencing intermittent (and hard to debug) TLS
errors when loading the portal authentication page. This could be
caused by using http://www.gnome.org/ for our connectivity checks
because it redirects to HTTPS.

We can completely remove TLS from the equation by not using HTTPS.
http://nmcheck.gnome.org/ is a good choice because it doesn't redirect
to HTTPS and was created for NetworkManager's connectivity check.

https://bugzilla.gnome.org/show_bug.cgi?id=769940

js/portalHelper/main.js

index b15dfcfd6b375a65005f28e55e157f12b58ccadc..75daf6670fde01442d5210d9b09a9f50827b565d 100644 (file)
@@ -50,7 +50,7 @@ const PortalWindow = new Lang.Class({
         this.parent({ application: application });
 
         if (!url) {
-            url = 'http://www.gnome.org';
+            url = 'http://nmcheck.gnome.org';
             this._originalUrlWasGnome = true;
         } else {
             this._originalUrlWasGnome = false;
@@ -112,12 +112,12 @@ const PortalWindow = new Lang.Class({
         let uri = new Soup.URI(request.get_uri());
 
         if (!uri.host_equal(this._uri) && this._originalUrlWasGnome) {
-            if (uri.get_host() == 'www.gnome.org' && this._everSeenRedirect) {
+            if (uri.get_host() == 'nmcheck.gnome.org' && this._everSeenRedirect) {
                 // Yay, we got to gnome!
                 decision.ignore();
                 this._doneCallback(PortalHelperResult.COMPLETED);
                 return true;
-            } else if (uri.get_host() != 'www.gnome.org') {
+            } else if (uri.get_host() != 'nmcheck.gnome.org') {
                 this._everSeenRedirect = true;
             }
         }